package com.gientech.zookeeper.Controller;

import com.gientech.zookeeper.feign.TestFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Pactera
 */
@RestController
public class TestController {

    @Autowired
    private TestFeign testFeign;


    @GetMapping("/hello/{msg}")
    public String hello(@PathVariable("msg") String msg){
        return "hello "+msg;
    }

    @GetMapping("/svc/{msg}")
    public Object svc(@PathVariable("msg") String msg){
        return testFeign.hello(msg);
    }
}
